package com.rizzo.web.security;

import java.io.Serializable;
import java.util.List;

/**
 * POJO that contains data concerning the Functions of a certain Role.
 * Caution: the allowed List is not mandatory so it might be null.
 *
 * @author jalieven
 */
public class Role implements Serializable {

    private static final long serialVersionUID = -7957521471421472340L;

    private RoleEnum roleEnum;
    private List<Function> functions;
    private List<Function> allowed;

    // Constructors
    public Role(RoleEnum roleEnum, List<Function> functions, List<Function> allowed) {
        this.roleEnum = roleEnum;
        this.functions = functions;
        this.allowed = allowed;
    }

    public Role(RoleEnum roleEnum, List<Function> functions) {
        this.roleEnum = roleEnum;
        this.functions = functions;
    }

    /**
     * Getter for property 'roleEnum'.
     *
     * @return Value for property 'roleEnum'.
     */
    public RoleEnum getRoleEnum() {
        return roleEnum;
    }

    /**
     * Setter for property 'roleEnum'.
     *
     * @param roleEnum Value to set for property 'roleEnum'.
     */
    public void setRoleEnum(RoleEnum roleEnum) {
        this.roleEnum = roleEnum;
    }

    /**
     * Getter for property 'functions'.
     *
     * @return Value for property 'functions'.
     */
    public List<Function> getFunctions() {
        return functions;
    }

    /**
     * Setter for property 'functions'.
     *
     * @param functions Value to set for property 'functions'.
     */
    public void setFunctions(List<Function> functions) {
        this.functions = functions;
    }

    /**
     * Getter for property 'allowed'.
     *
     * @return Value for property 'allowed'.
     */
    public List<Function> getAllowed() {
        return allowed;
    }

    /**
     * Setter for property 'allowed'.
     *
     * @param allowed Value to set for property 'allowed'.
     */
    public void setAllowed(List<Function> allowed) {
        this.allowed = allowed;
    }
}
